const prodetailtstate = {
    proNum: "未知",
    proName: "未知",
    prodUnit: "未知",
    prodApplyArea: 0,
    proAddArea: 0,
};
const state = () => {
    return prodetailtstate;
};
const mutations = {
    initstate(state: typeof prodetailtstate, detail: any) {
        state.proNum = detail.批准文号;
        state.proName = detail.项目名称;
        state.prodUnit = detail.项目类型;
        state.prodApplyArea = detail.批准总面积;
        state.proAddArea = detail.批准国有总面积;                
    }
};
const actions = {
    changedetail(context: any, detail: any) {
        context.commit("initstate", detail);
    },
};

const getters = {
    getprodetail(state: typeof prodetailtstate) {
        return state;
    },
};

export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters,
};

